package linear2;

public class TwoWayLinkListTest {
    public static void main(String[] args) {
        TwoWayLinkList<String> list=new TwoWayLinkList<String>();
        list.insertLast("张1");
        list.insertLast("张2");
        list.insertLast("张3");
        list.insertLast("张4");
        list.insertLast("张5");
//        System.out.println(list.remove(2).toString());
//        for (String s:list){
//            System.out.println(s);
//        }
//        System.out.println(list.getFirst());
//        System.out.println(list.getLast());
        System.out.println("原数据");
        for (String s:list){
            System.out.println(s);
        }
        System.out.println("反转后");

        for (String s:list){
            System.out.println(s);
        }

    }
}
